import Vue from "vue";
import Router from "vue-router";
import home from "@/components/home"; //首页
import container from "@/components/container";

import ticketList from "@/components/ticketBox/ticketList"; //门票列表
import ticketRelease from "@/components/ticketBox/ticketRelease"; //门票发布

import forumManagement from "@/components/forumManagementBox/forumManagement"; //论坛管理

import fieldManagement from "@/components/fieldManagementBox/fieldManagement"; //字段管理
import formMain from "@/components/fieldManagementBox/form/formMain"; //表单主页

import shareList from "@/components/shareBox/shareList"; //分享列表

import userProtocol from "@/components/protocol/userProtocol"; // 用户协议
import loginProtocol from "@/components/protocol/loginProtocol"; // 登陆协议
import faceProtocol from "@/components/protocol/faceProtocol"; // 录脸协议
import proDetails from "@/components/protocol/proDetails"; // 协议详情

import priceGroup from "@/components/priceGroup/priceList"; // 价格组
import priceDetails from "@/components/priceGroup/priceDetails"; // 价格组

import otherInstall from "@/components/other/otherInstall"; // 其他设置
import orderDetail from "@/components/order/orderDetail"; // 订单信息

// power  权限
import powerManage from "@/components/power/powerManage"; //权限管理

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "home",
      component: home,
      children: [
        {
          path: "/",
          name: "container",
          component: container,
          children: [
            {
              path: "/",
              name: "ticketList",
              component: ticketList
            },
            {
              path: "ticketList",
              name: "ticketList",
              component: ticketList
            },
            {
              path: "ticketRelease",
              name: "ticketRelease",
              component: ticketRelease
            },
            // 其他设置
            {
              path: "otherInstall",
              name: "otherInstall",
              component: otherInstall
            },
            // 订单信息
            {
              path: "orderDetail",
              name: "orderDetail",
              component: orderDetail
            },
            {
              path: "ticketRelease/:ticketD",
              name: "ticketRelease",
              component: ticketRelease
            },
            {
              path: "forumManagement",
              name: "forumManagement",
              component: forumManagement
            },
            // 用户协议
            {
              path: "userProtocol",
              name: "userProtocol",
              component: userProtocol
            },
            // 登陆协议
            {
              path: "loginProtocol",
              name: "loginProtocol",
              component: loginProtocol
            },
            // 录脸协议
            {
              path: "faceProtocol",
              name: "faceProtocol",
              component: faceProtocol
            },
            {
              path: "proDetails",
              name: "proDetails",
              component: proDetails
            },
            // 价格组
            {
              path: "priceGroup",
              name: "priceGroup",
              component: priceGroup
            },
            {
              path: "priceDetails",
              name: "priceDetails",
              component: priceDetails
            },
            {
              path: "shareList",
              name: "shareList",
              component: shareList
            },
            {
              path: "fieldManagement",
              name: "fieldManagement",
              component: fieldManagement
            },
            {
              path: "formMain",
              name: "formMain",
              component: formMain
            },
            {
              path: "formMain/:formName/:componenList/:id",
              name: "formMain",
              component: formMain
            },
            {
              path: "powerManage",
              name: "powerManage",
              component: powerManage
            }
          ]
        }
      ]
    }
  ]
});
